Home Teaching Research About & Contact

UCB Math 128A Spring 2026 Discussions

Tuesday 10-11 AM (Disc 112), and 11 AM - 12 PM (Disc 113), both in Evans Hall B3A

Throughout the semester, I'll add materials here for our class. Recordings will only be accessible through the bCourses page, though I'll retain other files here.



Office hours Wednesdays and Thursdays 10:15 - 11:45 in Evans 762. Note that my office is Evans 787, just down the hall.


Important Reminders:

Some Resources for MatLab

Everyone is coming to the class with a different level of coding knowledge, so here are some extra links to help you get started with MatLab. You can set up your MatLab account and download software by following the information here , but you can also use MatLab online for coding if you don't want to download it. There are lots of tutorials out there (the official MatLab onramp can be found here ). We will teach you what you need in time, and I will include files for or from discussion or office hours here. I also ahve a quick-start to make you a little more comfortable with using MatLab below.

Quickstart: this is a imple coding example for how to take a derivative of a function and use some basic file formats in MatLab. First, open the MatLab program. If you're signed in, you should see a file directory, perhaps an open file, and the command window. On the file directory, right click and create a new function. Name the file "fdd.m". It will have some example text involved. The file name is important because it is the function name you will call when you want to use this function in other files or the command window.

Next, we will define the function. The top line should start with "function" regardless of what else you want. We then have the function call, something like "output = fdd(input)". We will have one output, and three inputs. You should name these in a useful way when you write functions. For us, the top line will read "function deriv = fdd(fun, x, step)". Next, you should include a description of what the function does and what the inputs are. To write these, we use a percent sign to denote comments. An example line could be "%fdd: a function which returns the finite difference derivative at a point". Next, the body of the function does whatever you want it to. This is the part which we will make very complicated later on. For now, input the definition of the derivative. The whole file should look like this:

function deriv = fdd(fun, x, step)
%Finite-Difference Derivative
%fun: the function you want to differentiate
%x: the value you wish to differentiate at
%step: the step for the derivative
deriv = (fun(x+step) - fun(x))/h

Save the file, and move to your command line. We want a function to differentiate, so we need to initialize one in the command line. Write "f = @(x) x^2". This gives the function the name "f", where the @(x) denotes the variable involved and the x^2 means we have x squared. Notice that here I mean a math function, and above I'm talking about a coding function. Hit enter. You can now call the derivative function. Write "fdd(f,2,0.05)" in the command line and hit enter. If everything is correct, you should recieve back the value 4.05. Play around with different functions and values. You can also try writing an integral (note, MatLab has built in functions for these operations!)

Discussion Notes

Running Notes.

Topics Covered So Far: